Filename | (eval 1118)[/usr/share/perl5/CGI.pm:932] |
Statements | Executed 50 statements in 316µs |
Eval Invoked At | /usr/share/perl5/CGI.pm line 932 |
Sibling evals | 1, 2, 3, 4, 5, 6 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
13 | 4 | 3 | 709µs | 5.44ms | cookie | CGI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 5.44ms (709µs+4.73) within CGI::cookie which was called 13 times, avg 418µs/call:
# 4 times (153µs+2.05ms) by C4::Auth::checkauth at line 775 of C4/Auth.pm, avg 550µs/call
# 4 times (161µs+1.81ms) by C4::Search::History::get_from_session at line 201 of C4/Search/History.pm, avg 494µs/call
# 4 times (353µs+453µs) by C4::Auth::checkauth at line 883 of C4/Auth.pm, avg 202µs/call
# once (42µs+416µs) by CGI::Compile::ROOT::home_vagrant_kohaclone_circ_ysearch_2epl::__ANON__[/home/vagrant/kohaclone/circ/ysearch.pl:115] at line 42 of circ/ysearch.pl | ||||
2 | 5 | 64µs | 21 | 92µs | my($self,@p) = self_or_default(@_); # spent 92µs making 21 calls to CGI::self_or_default, avg 4µs/call |
3 | 5 | 134µs | 21 | 449µs | my($name,$value,$path,$domain,$secure,$expires,$httponly) = # spent 449µs making 21 calls to CGI::Util::rearrange, avg 21µs/call |
4 | rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES,HTTPONLY],@p); | ||||
5 | |||||
6 | 5 | 9µs | require CGI::Cookie; | ||
7 | |||||
8 | # if no value is supplied, then we retrieve the | ||||
9 | # value of the cookie, if any. For efficiency, we cache the parsed | ||||
10 | # cookies in our state variables. | ||||
11 | 5 | 2µs | unless ( defined($value) ) { | ||
12 | 4 | 50µs | 17 | 6.27ms | $self->{'.cookies'} = CGI::Cookie->fetch; # spent 6.27ms making 17 calls to CGI::Cookie::fetch, avg 369µs/call |
13 | |||||
14 | # If no name is supplied, then retrieve the names of all our cookies. | ||||
15 | 4 | 3µs | return () unless $self->{'.cookies'}; | ||
16 | 4 | 1µs | return keys %{$self->{'.cookies'}} unless $name; | ||
17 | 4 | 23µs | 17 | 1.12ms | return () unless $self->{'.cookies'}->{$name}; # spent 1.12ms making 17 calls to CGI::Cookie::as_string, avg 66µs/call |
18 | 4 | 20µs | 17 | 26µs | return $self->{'.cookies'}->{$name}->value if defined($name) && $name ne ''; # spent 26µs making 17 calls to CGI::Cookie::value, avg 2µs/call |
19 | } | ||||
20 | |||||
21 | # If we get here, we're creating a new cookie | ||||
22 | 1 | 600ns | return undef unless defined($name) && $name ne ''; # this is an error | ||
23 | |||||
24 | 1 | 200ns | my @param; | ||
25 | 1 | 700ns | push(@param,'-name'=>$name); | ||
26 | 1 | 400ns | push(@param,'-value'=>$value); | ||
27 | 1 | 100ns | push(@param,'-domain'=>$domain) if $domain; | ||
28 | 1 | 0s | push(@param,'-path'=>$path) if $path; | ||
29 | 1 | 0s | push(@param,'-expires'=>$expires) if $expires; | ||
30 | 1 | 200ns | push(@param,'-secure'=>$secure) if $secure; | ||
31 | 1 | 600ns | push(@param,'-httponly'=>$httponly) if $httponly; | ||
32 | |||||
33 | 1 | 7µs | 4 | 256µs | return CGI::Cookie->new(@param); # spent 256µs making 4 calls to CGI::Cookie::new, avg 64µs/call |
34 | } | ||||
35 | |||||
36 | ; |